<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8">
<title>托单录入</title>
<link rel="stylesheet" href="../../jquery-easyui-1.3.6/themes/default/easyui.css" type="text/css"></link>
<link rel="stylesheet" href="../../css/icons/icon.css" type="text/css"></link>
<link rel="stylesheet" type="text/css" href="../demo.css"></link>
<script type="text/javascript" src="../../jquery-easyui-1.3.6/jquery.min.js"></script>
<script type="text/javascript" src="../../jquery-easyui-1.3.6/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../jquery-easyui-1.3.6/locale/easyui-lang-zh_CN.js"
	charset="utf-8"></script>
	<!-- <script type="text/javascript">//滑动实现tab切换
		$(function(){
			var tabs = $('#tt').tabs().tabs('tabs');
			for(var i=0; i<tabs.length; i++){
				tabs[i].panel('options').tab.unbind().bind('mouseenter',{index:i},function(e){
					$('#tt').tabs('select', e.data.index);
				});
			}
		});
	</script> -->
	
<script type="application/javascript">//json封装  
$.fn.serializeObject = function()    
{    
   var o = {};    
   var a = this.serializeArray();    
   $.each(a, function() {    
       if (o[this.name]) {    
           if (!o[this.name].push) {    
               o[this.name] = [o[this.name]];    
           }    
           o[this.name].push(this.value || '');    
       } else {    
           o[this.name] = this.value || '';    
       }    
   });    
   return o;    
};    
function onClik(){  
        //var data = $("#form1").serializeArray(); //自动将form表单封装成json提交  
        //alert(JSON.stringify(data));  
        var jsonuserinfo = $('#form1').serializeObject();
        alert(JSON.stringify(jsonuserinfo));  
}
function onClik6(){  
        //var data = $("#form6").serializeArray(); //自动将form表单封装成json提交  
        //alert(JSON.stringify(data));  
        var jsonuserinfo = $('#form6').serializeObject();
        alert(JSON.stringify(jsonuserinfo));  
}  
</script>

<script type="text/javascript">
	//单选按钮选中后双击取消选中
	window.onload = function() {
		// setRadio("myDiv", "form1", "alreadySelected"); 
		var radios = document.getElementsByTagName("input");
		for ( var i = 0; i < radios.length; i++) {
			if (radios[i].type == "radio") {
				radios[i].ondblclick = function() {
					this.checked = false;
				}
			}
		}
	}
</script>

<script type="text/javascript">
    //清空表单
		function submitForm(){
			$('#form1').form('submit');
		}
		function clearForm(){
			$('#form1').form('clear');
		}
		function clearForm6(){
			$('#form6').form('clear');
		}
	</script>

</head>
<body>
	
	<div id="tt" class="easyui-tabs" style="width:700px;height:300px" tabPosition="top" data-options="fit:true,border:false">
		<div title="拖卡托单" style="padding:10px" closable="true" data-options="iconCls:'icon-formedit'">
		<div class="easyui-panel" title="拖卡托单详情" style="width:900px">
		<div style="padding:10px 0 10px 10px">
	    <form id="form1" name="form1" method="post" action="">
	    	<table>
	    		<tr>
	    			<td align="right">选择客户</td>
	    			<td><input id="client" class="easyui-combobox" name="client" data-options="valueField:'client_code',textField:'client_name',url:'get_client.json'" /></td>
	    		</tr>
				<tr>
	    		<tr>
	    			<td align="right">选择箱型</td>
	    			<td><input id="box_type" class="easyui-combobox" name="box_type" data-options="valueField:'box_code',textField:'box_name',url:'get_box.json'" /></td>
					<td align="right">选择尺寸</td>
	    			<td><select id="box_size" class="easyui-combobox" name="box_size" style="width:150px;"><option value=""></option><option value="20">20</option><option value="40">40</option><option value="45">45</option></select></td>
				    <td align="right">吨位</td>
	    			<td><textarea id="ton" class="easyui-numberbox" name="ton" data-options="min:0,precision:1" suffix=" T" style="height:20px;"></textarea></td>
					<td align="right">截关日期</td>
					<td><input id="cutoff_date" class="easyui-datebox" name="cutoff_date" /></td>
	    		</tr>
	    		<tr>
	    			<td align="right">领箱单时间</td>
					<td><input id="receive_box_date" class="easyui-datetimebox" name="receive_box_date" /></td>
					<td align="right">领箱单地址</td>
					<td><textarea id="receive_box_addr" name="receive_box_addr"  style="height:20px"></textarea></td>
					<td align="right">领箱联系人电话</td>
					<td><textarea id="receive_box_tel" class="easyui-numberbox" name="receive_box_tel"  style="height:20px"></textarea></td>
				</td>
	    		</tr>
	    		<tr>
	    			<td align="right">拖卡时间</td>
					<td><input id="haul_date" class="easyui-datetimebox" name="haul_date" /></td>
					<td align="right">拖卡地址</td>
					<td><textarea id="haul_addr" name="haul_addr"  style="height:20px"></textarea></td>
					<td align="right">拖卡联系人电话</td>
					<td><textarea id="haul_tel" class="easyui-numberbox" name="haul_tel"  style="height:20px"></textarea></td>
				</td>
	    		</tr>
	    		<tr>
				    <td align="right">拖卡费</td>
					<td><textarea id="cost" class="easyui-numberbox" name="cost"  style="width:129px;height:20px;" prefix="￥" data-options="min:0,precision:2"></textarea></td>
					<td align="right">结算期限</td>
	    			<td><select id="deadline" class="easyui-combobox" name="deadline" style="width:150px;"><option value=""></option><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select></td>
	    			<td align="right">可否代货</td>
	    			<td><select id="daihuo" class="easyui-combobox" name="可否代货" style="width:150px;"><option value="否">否</option><option value="是">是</option></select></td>
	    		</tr>
				<tr><td><br/><br/><td></tr>
				
				<tr>
				    <td align="right">销售人员</td>
					<td><input id="sale" class="easyui-combobox" name="sale" data-options="valueField:'staff_code',textField:'cname',url:'employee.json'" /></td>
					<td align="right">销售备注</td>
					<td><textarea id="sale_remark" name="sale_remark" ></textarea></td>
				</tr>
	    	</table>
	    </form>
	    </div>
	    <div style="text-align:center;padding:10px">
	    	<a onclick="onClik();" href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">提交</a>
	    	<a onclick="clearForm()" href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-undo'">重置</a>
	    </div>
	</div>
		
				
		</div>
		<div title="中烟托单" style="padding:10px" data-options="iconCls:'icon-formedit'">
		</div>
		<div title="烟草托单" style="padding:10px" data-options="iconCls:'icon-formedit'">
		</div>
		<div title="危品托单" style="padding:10px" data-options="iconCls:'icon-formedit'">
		</div>
		<div title="冷链托单" style="padding:10px" data-options="iconCls:'icon-formedit'">
		</div>
		<div title="普货托单" style="padding:10px" data-options="iconCls:'icon-formedit'">
		<div class="easyui-panel" title="普货托单详情" style="width:1100px">
		<div style="padding:10px 0 10px 10px">
	    <form id="form6" name="form6" method="post" action="">
	    	<table>
	    		<tr>
	    			<td align="right">选择客户</td>
	    			<td><input id="client" class="easyui-combobox" name="client" data-options="valueField:'client_code',textField:'client_name',url:'get_client.json'" /></td>
	    		</tr>
	    		<tr>
	    			<td align="right">立方</td>
	    			<td><textarea id="cube" class="easyui-numberbox" name="cube" data-options="min:0,precision:1" suffix=" M³" style="width:129px;height:20px;"></textarea></td>
				    <td align="right">吨位</td>
	    			<td><textarea id="ton" class="easyui-numberbox" name="ton" data-options="min:0,precision:1" suffix=" T" style="height:20px;"></textarea></td>
	    		</tr>
	    		<tr>
	    			<td align="right">装货时间</td>
					<td><input id="load_date" class="easyui-datetimebox" name="load_date" /></td>
					<td align="right">装货地址</td>
					<td><textarea id="load_addr" name="load_addr"  style="height:20px"></textarea></td>
					<td align="right">装货联系人电话</td>
					<td><textarea id="load_tel" class="easyui-numberbox" name="load_tel"  style="height:20px"></textarea></td>
				</td>
	    		</tr>
	    		<tr>
	    			<td align="right">收货时间</td>
					<td><input id="receive_date" class="easyui-datetimebox" name="receive_date" /></td>
					<td align="right">收货地址</td>
					<td><textarea id="receive_addr" name="receive_addr"  style="height:20px"></textarea></td>
					<td align="right">收货联系人电话</td>
					<td><textarea id="receive_tel" class="easyui-numberbox" name="receive_tel"  style="height:20px"></textarea></td>
				</td>
	    		</tr>
				<tr>
	    			<td align="right">送货方式</td>
					<td><input id="deliver_type" name="deliver_type" type="radio" value="自提" />自提<input id="deliver_type" name="deliver_type" type="radio" value="送货上门" />送货上门</td>
					<td align="right">回单情况</td>
					<td><input id="recovery" name="recovery" type="radio" value="未签回" />未签回<input id="recovery" name="recovery" type="radio" value="已签回" />已签回</td>
					<td align="right">回单签收要求</td>
					<td><input id="sign" type="checkbox" name="sign" value="签托运单回执" />签托运单回执<input id="sign" type="checkbox" name="sign" value="签客户送货单回执" />签客户送货单回执<input id="sign" type="checkbox" name="sign" value="收货人必须盖章" />收货人必须盖章&nbsp;&nbsp;其他<textarea id="sign" name="sign"  style="width:90px;height:20px"></textarea></td>
	    		</tr>
				<tr>
				    <td align="right">运费</td>
					<td><textarea id="transport_cost" class="easyui-numberbox" name="transport_cost"  style="width:129px;height:20px;" prefix="￥" data-options="min:0,precision:2"></textarea></td>
					<td align="right">直送费</td>
					<td><textarea id="direct_cost" class="easyui-numberbox" name="direct_cost"  style="height:20px;" prefix="￥" data-options="min:0,precision:2"></textarea></td>
	    			<td align="right">提货费</td>
					<td><textarea id="lading_cost" class="easyui-numberbox" name="lading_cost"  style="height:20px;" prefix="￥" data-options="min:0,precision:2"></textarea></td>
			    </tr>
				<tr>
					<td align="right">垫付费</td>
					<td><textarea id="advance_cost" class="easyui-numberbox" name="advance_cost"  style="width:129px;height:20px;" prefix="￥" data-options="min:0,precision:2"></textarea></td>
	    			<td align="right">付款方式</td>
					<td><input id="pay_type" name="pay_type" type="radio" value="现付" />现付<input id="pay_type" name="pay_type" type="radio" value="欠款" />欠款<input id="pay_type" name="pay_type" type="radio" value="提货付款">提货付款</td>
				</tr>
				<tr>
				    <td align="right">代收运费金额</td>
					<td><textarea id="replace_transport_cost" class="easyui-numberbox" name="replace_transport_cost"  style="width:129px;height:20px;" prefix="￥" data-options="min:0,precision:2"></textarea></td>
					<td align="right">代收货款金额</td>
					<td><textarea id="replace_direct_cost" class="easyui-numberbox" name="replace_direct_cost"  style="height:20px;" prefix="￥" data-options="min:0,precision:2"></textarea></td>
	    			<td align="right">附发票号</td>
					<td><textarea id="invoice_no" class="easyui-numberbox" name="invoice_no"  style="height:20px;" data-options="min:0"></textarea></td>
			    </tr>
				<tr>
					<td align="right">中转费</td>
					<td><textarea id="transit_cost" class="easyui-numberbox" name="transit_cost"  style="width:129px;height:20px;" prefix="￥" data-options="min:0,precision:2"></textarea></td>
					<td align="right"><input id="replace_type" name="replace_type" type="radio" value="先直送后收货" />先直送后收货</td>
					<td align="right"><input id="replace_type" name="replace_type" type="radio" value="先收款后送货" />先收款后送货&nbsp;&nbsp;&nbsp;&nbsp;<input id="replace_type" name="replace_type" type="radio" value="自送">自送</td>
				    <td align="right"><input id="replace_type" name="replace_type" type="radio" value="上门提货">上门提货&nbsp;&nbsp;&nbsp;&nbsp;其他</td>
					<td align="left"><textarea id="replace_type" name="replace_type"  style="height:20px"></textarea></td>
				</tr>
	    		<tr>
				    <td align="right">拖卡费</td>
					<td><textarea id="cost" class="easyui-numberbox" name="cost"  style="width:129px;height:20px;" prefix="￥" data-options="min:0,precision:2"></textarea></td>
					<td align="right">结算期限</td>
	    			<td><select id="deadline" class="easyui-combobox" name="deadline" style="width:150px;"><option value=""></option><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select></td>
	    		</tr>
				<tr><td><br/><br/><td></tr>
				
				<tr>
				    <td align="right">销售人员</td>
					<td><input id="sale" class="easyui-combobox" name="sale" data-options="valueField:'staff_code',textField:'cname',url:'employee.json'" /></td>
					<td align="right">销售备注</td>
					<td><textarea id="sale_remark" name="sale_remark" ></textarea></td>
				</tr>
	    	</table>
	    </form>
	    </div>
	    <div style="text-align:center;padding:10px">
	    	<a onclick="onClik6();" href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">提交</a>
	    	<a onclick="clearForm6()" href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-undo'">重置</a>
	    </div>
	</div>
		</div>
	</div>

</body>
</html>